home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / efun / restore_object < prev    next >
Text File  |  2001-04-06  |  1KB  |  37 lines

  1. SYNOPSIS
  2.         int restore_object (string name)
  3.         int restore_object (string str)  (PRELIMINARY)
  4.  
  5. DESCRIPTION
  6.         Restore values of variables for current object from the file <name>,
  7.         or directly from the string <str>.
  8.  
  9.         To restore directly from a string <str>, the string must begin
  10.         with the typical line "#x:y" as it is created by the save_object()
  11.         efun.
  12.  
  13.         When restoring from a file, the name may end in ".c" which is stripped
  14.         off by the parser. The master object will probably append a .o to the
  15.         <name>. The validity of the filename is checked with a call to
  16.         check_valid_path().
  17.  
  18.         Return 1 on success, 0 if there was nothing to restore.
  19.         
  20.         Variables that has the type modifer 'nosave' will not be restored.
  21.         Example: nosave int xxx;
  22.         
  23.         If inheritance is used, then it might be possible that a variable
  24.         will exist with the same name in more than one place. When
  25.         restoring, only one of these variables will be restored if
  26.         encountered in the save file.
  27.         A good practice is to have verbose and unique name on non-static
  28.         variables, which also will make it more easy to read or patch the
  29.         save file manually.
  30.  
  31. HISTORY
  32.         Restoring directly from a string was added in LDMud 3.2.8 and
  33.         may be moved in future into a separate efun.
  34.  
  35. SEE ALSO
  36.             save_object(E), restore_value(E), valid_read(M)
  37.